Conventionally, there has been used a magnetic sensor such as a proximity switch for detecting presence/absence of a magnetic body portion of an object to be detected which is located at a close position.
For example, a portable electronic device such as a cellular phone using a folding structure has a function for controlling power saving, for example, turning off a backlight of liquid crystal or limiting a communication function when being folded, and is equipped with the above-mentioned magnetic sensor circuit (for example, see Patent Document 1).
A hole element is used for the magnetic sensor in many cases, but as in the case of a piezo resistive sensor (for example, pressure sensor, acceleration sensor, or distortion sensor) or the like, sensitivity of the hole element is proportional to a power supply voltage, and hence sensitivity varies in accordance with the power supply voltage. Therefore, it is necessary to change a voltage value of a reference voltage in the case of detecting output of the sensor.
Further, in the magnetic sensor using the hole element, in order that an output value of the object to be detected when being located at a close position or remote position exhibits hysteresis and malfunction due to noise is prevented, reference voltages used at a detection point and a release point are made to be different from each other and need to be set so as to have a hysteresis width. In other words, the hysteresis width shows a voltage difference between a voltage value of the detection point and a voltage value of the release point.
A reference voltage generating circuit illustrated in FIG. 12 is a circuit for outputting a plurality of reference voltages and bringing those reference voltages into correspondence with a change in power supply voltage (for example, see Patent Document 2).
The reference voltage generating circuit is formed of a first operational amplifier 3a, a second operational amplifier 3b, and a plurality of resistors connected in series which are interposed between output terminals of the first operational amplifier 3a and the second operational amplifier 3b. 
A first input signal is input to a first input terminal (inverting input terminal) of the first operational amplifier 3a, a second input signal is input to a second input terminal (inverting input terminal) of the second operational amplifier 3b, and voltages of those signals are impedance-converted by an inverting amplifier, to thereby output the divided voltage for each connection point of the plurality of resistors connected in series as the plurality of reference voltages.
When a first variable resistor 5a and a second variable resistor 5b, which are used for offset voltage adjustment, are provided to non-inverting input terminals of the first operational amplifier 3a and the second operational amplifier 3b, respectively, an offset voltage can be adjusted.
A resistance value is adjusted such that the first variable resistor 5a and the second variable resistor 5b are caused to work in directions opposite to each other in accordance with a voltage level of an input signal output from the magnetic sensor. Specifically, in the case where an output voltage at a midpoint of the first variable resistor 5a is increased, an output voltage at a midpoint of the second variable resistor 5b is decreased. Conversely, in the case where the output voltage at the midpoint of the first variable resistor 5a is decreased, the output voltage at the midpoint of the second variable resistor 5b is increased.
Through the above-mentioned adjustment, the reference voltages output from connection points of the respective resistors other than the midpoints thereof can be changed without changing the voltages at the midpoints of the plurality of resistors connected in series.    Patent Document 1 JP 09-166405 A    Patent Document 2 JP 10-268253 A
However, in the conventional reference voltage generating circuit described above, as illustrated in FIG. 13, when the first variable resistor 5a and the second variable resistor 5b are changed and voltage values of the detection point and the release point are changed within a voltage range between both ends of the resistors connected in series for voltage division, a hysteresis width between the detection point and the release point is also changed along with those changes.
For this reason, the conventional reference voltage generating circuit has a disadvantage in that, in the case where an output value of the hole element is used as a reference voltage of a comparator to be detected, as illustrated in FIG. 14, sensitivity of detection and release with respect to a magnetic flux density of a magnetic field becomes sufficient when the hysteresis width is reduced, and reaction to noise is excessively sensitive, whereby the magnetic sensor circuit judges erroneous detection and erroneous release.
The present invention has been made in view of the above-mentioned circumstances, and an object thereof is to provide a variable voltage dividing circuit capable of changing voltage values of a detection point and a release point along with a change in power supply voltage without changing a hysteresis width.